<?php

global $confirmType;
global $actionType;
global $organizationType;
//return;
?>



	<div class="block">

	<div class="invertedshiftdown">
<ul>
	<?php
	if($organization->type=='s'){
	?>
			<li><a href="?page=organization_inventory&id=<?php echo $organization->id; ?>">查看货存</a></li>
			<li><a href="?page=organization_sell&id=<?php echo $organization->id; ?>">出售</a></li>
			<li><a href="?page=organization_return&id=<?php echo $organization->id; ?>">退款</a></li>
			<li><a href="?page=organization_distribute&id=<?php echo $organization->id; ?>">分配</a></li>
			<li class="current"><a href="?page=organization_distribute_confirm&id=<?php echo $organization->id; ?>">处理待定分配</a></li>
			<li><a href="?page=organization_transaction&id=<?php echo $organization->id; ?>">查看物流记录</a></li>
			<li><a href="?page=organization_sell_record&id=<?php echo $organization->id; ?>">查看销售记录</a></li>
	<?php
	}elseif($organization->type=='w'){
	?>
	       	<li><a href="?page=organization_inventory&id=<?php echo $organization->id; ?>">查看库存</a></li>
			<li><a href="?page=organization_stack&id=<?php echo $organization->id; ?>">入库</a></li>
			<li><a href="?page=organization_distribute&id=<?php echo $organization->id; ?>">分配</a></li>
			<li class="current"><a href="?page=organization_distribute_confirm&id=<?php echo $organization->id; ?>">处理待定分配</a></li>
			<li><a href="?page=organization_transaction&id=<?php echo $organization->id; ?>">查看物流记录</a></li>
			
    <?php
	}
	?>
</ul>




<form id="myform">
<input type="text" class="textinput" /> <input class="submit" type="submit" value="搜索" />
</form>
</div>

<br style="clear: both;" />
<div id= 'content'>

		<h2><?php echo $organization->name ?>》待处理事务记录显示</h2>
		
		
		
		<?php
	//print_r($_GET);
	if(isset($_GET['stat'])){
		if($_GET['stat']=='confirmed'){
			
		
	
	?>
	<div class="isa_success">
		<h4>操作成功：</h4>分配确认成功
	</div>
	
	<?php
		}elseif($_GET['stat']=='error'&&$_GET['error']=='unknow'){
	?>
	<div class="isa_warning">
		<h4>操作失败：</h4>无法进行此次确认
	</div>
	
		<?php
		}elseif($_GET['stat']=='error'&&$_GET['error']=='badData'){
	?>
	<div class="isa_warning">
		<h4>操作失败：</h4>无法入库（提交了无效数据）
	</div>
<?php

		}
		echo "<br>";
}
?>

<form action="api/" method="post">
        	<input type="hidden" id='action' name="action" value="organization_distribute_confirm" />
        	<input type="hidden" id='user1' name="user1" value="<?php echo $currentUser->id ?>" />
        	<input type="hidden" id='source' name="source" value="<?php echo  $organization->id ?>" />        	

	<?php
	echo $table;
	?>
<br>

<div class="important">请务必先核对货物，然后请选中所要确认的分配的记录号（可多选） 最后按下面按钮</div><br>
	<?php
if(count($organization->getTransactions())){
             ?>
             <div class="element" style="clear:both;">
		    <input type="submit" name="submit" value="确认选中交易" />
             </div>
             <?php
}else{
             ?>
             <div class="element" style="clear:both;">
		    <input type="submit" name="submit" value="确认选中交易" disabled/>
             </div>
             <?php
}
             ?>
	
	

		</form>
<br>
<br>
<br>


   
<div class="clear"></div>
	</div>